﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;



using FXnaWpfBase;

using NSApplication;

using FXnaAppBaseWpf;



namespace NSPresentation
{

    public class TvProjectViewModel : MDTVIViewModel
    {


        public TvProjectViewModel(MDTVIViewModel parent)
            : base(parent)
        {

            this._project = ProjectService.CurrentService.Project;

            this.LoadChildren();


        }


        Project _project;


        public override string Desc
        {
            get
            {
                return "项目(" + ProjectService.CurrentService.GetProjName() + ")";
            }
        }



        protected override void LoadChildren()
        {
            base.LoadChildren();





            //通用数据，位图，矢量图等




            BitmapCollecionViewModel bitmap = new BitmapCollecionViewModel(this, this._project.CommonData.Images);

            this.Children.Add(bitmap);


            //矢量图数据

            VectorImageCollectionVM vectors = new VectorImageCollectionVM(this, this._project.CommonData.VectorLayers);

            this.Children.Add(vectors);



            //污染源
            TvSourcesVM sources = new TvSourcesVM(this);

            this.Children.Add(sources);



            //接受体

            ReceptorsVM receptors = new ReceptorsVM(this,this._project.NSData);

            this.Children.Add(receptors);






            ////计算模型

            //TvModelCollection model = new TvModelCollection(this);

            //this.Children.Add(model);


          








        }



    }
}
